9041c779740b7521370e6c5a706012e38b0b1b09,src/main/java/org/mitre/dsmiley/httpproxy/ProxyServlet.java,ProxyServlet,executeProxyRequest,#HttpRequest#HttpServletRequest#HttpServletResponse#,134

Before Change


      if (servletRequest.getServerPort() != 80) {
        stringMyHostName += ":" + servletRequest.getServerPort();
      }
      stringMyHostName += servletRequest.getContextPath();
      servletResponse.sendRedirect(locationHeader.getValue().replace(getProxyHostAndPort() + this.proxyPath, stringMyHostName));
      return;
    } else if (statusCode == HttpServletResponse.SC_NOT_MODIFIED) {

After Change


      if (servletRequest.getServerPort() != 80) {
        thisHostName += ":" + servletRequest.getServerPort();
      }
      thisHostName += servletRequest.getContextPath() + servletRequest.getServletPath();
      final String redirectTarget = locationHeader.getValue().replace(getProxyHostAndPort() + this.proxyPath, thisHostName);

      servletResponse.sendRedirect(redirectTarget);